<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>用户管理</title>

<link rel="stylesheet" type="text/css" href="./frame/page/user/baseTableCss.css" />

<div th:replace="/frame/lib/common/common :: bootCSS"></div>
<div th:replace="/frame/lib/common/common :: bootJS"></div>

</head>
<body>
<div class="container" id="app">
		<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<h4 class="modal-title">{{modalTitle}}</h4>
				</div>
				<div class="modal-body">
					<form class="form-horizontal" role="form">
						<div class="form-group">
							<label class="col-sm-3 col-md-3  col-lg-3 control-label">用户名</label>
							<div class="col-sm-3 col-md-3 col-lg-5">
								<input type="text" class="form-control" name="username" placeholder="必填" v-bind:readOnly="flag=='2'" v-model="user.username"></input>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 col-md-3  col-lg-3 control-label">昵称</label>
							<div class="col-sm-3 col-md-3 col-lg-5">
								<input type="text" class="form-control" name="nickname" v-model="user.nickname"></input>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 col-md-3  col-lg-3 control-label">密码</label>
							<div class="col-sm-3 col-md-3 col-lg-5">
								<input type="password" class="form-control" name="password" v-model="user.password"></input>
							</div>
							
						</div>
						<div class="form-group">
							<label class="col-sm-3 col-md-3  col-lg-3 control-label">确认密码</label>
							<div class="col-sm-3 col-md-3 col-lg-5">
								<input type="password" class="form-control"  name="confirmPassword" v-model="user.confirmPassword"></input>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 col-md-3  col-lg-3 control-label" >账户未过期</label>
							<div class="col-sm-3 col-md-3 col-lg-5">
								<div class="checkbox">
									<label>
										<input type="checkbox" name="accountNonExpired" v-model="user.accountNonExpired" ></input>
									</label>
								</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 col-md-3  col-lg-3 control-label" >账户未锁定</label>
							<div class="col-sm-3 col-md-3 col-lg-3">
								<div class="checkbox">
									<label>
										<input type="checkbox" name="accountNonLocked" v-model="user.accountNonLocked"></input>
									</label>
								</div>
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-sm-3 col-md-3  col-lg-3 control-label">证书未过期</label>
							<div class="col-sm-3 col-md-3 col-lg-5">
								<div class="checkbox">
									<label>
										<input type="checkbox" name="credentialsNonExpired" v-model="user.credentialsNonExpired"></input>
									</label>
								</div>
							</div>
							
						</div>
						<div class="form-group">
							<label class="col-sm-3 col-md-3  col-lg-3 control-label">可用</label>
							<div class="col-sm-3 col-md-3 col-lg-5">
								<div class="checkbox">
									<label>
										<input type="checkbox"  name="enabled" v-model="user.enabled"></input>
									</label>
								</div>
							</div>
						</div>
						<div class="form-group" style="text-align:center">
							<button  type="button" class="btn btn-default" data-dismiss="modal" >关闭</button>
							<button  type="submit" name="submit" class ="btn btn-primary" v-on:click="submit">提交</button>
						</div>
					</form>
				</div>
			<!-- 	<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal"> 关闭</button>
					<button type="button" class="btn btn-primary" v-on:click="submit"> 提交</button>
				</div> -->
			</div>
			</div>
			</div>
			<div class="modal fade" id="confirmModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
					</div>
					<div class="modal-body">
						<p>{{message}}</p>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal"> 否</button>
						<button type="button" class="btn btn-primary" v-on:click="submitDelete"> 是</button>
					</div>
				</div>
				</div>
      		 </div>
      		 <div class="modal fade" id="messageModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
					</div>
					<div class="modal-body">
						<p>{{message}}</p>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					</div>
				</div>
				</div>
      		 </div>
      		 
		<div id="toolbar" >
			<button class="btn btn-primary"  v-on:click="addUser"  data-target="#myModal">添加</button>
<!-- 			<button class="btn btn-success">授予管理员权限</button>
			<button class="btn btn-danger">取消管理员权限</button> -->
		</div>
		<div class="row">
			<table id="bootstrapTable"></table>
		</div>
	</div>
		
	<script type="text/javascript" th:src='@{/frame/page/user/baseUser.js}'></script>
</body>
</html>